package pers.zh.parking.common;

import java.text.SimpleDateFormat;

public interface Const {

	// 高德地图API key
	String A_MAP_KEY_PC = "c51f894df6dcbf09865b0327ad611b3c";
	String A_MAP_KEY_LAP = "965f481fa85a27ba47c4d41ff9c533d9";

	interface PoiType {
		// 停车场
		String PARKING_TYPE = "150900";
		//银行
		 String BANK = "160100";
		//地铁
		 String METRO = "150500";
		//医院
		 String HOSPITAL = "090100";
		//公交
		 String BUS = "150700";
		//学校
		 String SCHOOL = "141200";
		//购物
		 String SHOPPING = "060101";
		//超市
		 String SUPERMARKET = "060400";
		//休闲
		 String RELAXATION = "080000";
		//健身
		 String FITNESS = "080100";
	}

	interface Keys {

		String KEY_PARKING_LOT = "KEY_PARKING_LOT";
		String KEY_CUR_LOCATION = "KEY_CUR_LOCATION";
    }

	interface HttpConst {
		//所有的返回结构均为上述，其中errorCode如果为负数则认为错误，此时errorMsg会包含错误信息。
		// data为Object，返回数据根据不同的接口而变化
		//errorCode = 0 代表执行成功，不建议依赖任何非0的 errorCode.
		//errorCode = -1001 代表登录失效或未登录，需要重新登录。
		int HTTP_CODE_SUCCESS = 0;
		int HTTP_CODE_LOGIN_EXPIRED = -1001;
		int HTTP_CODE_ERROR = -1;
		long DEFAULT_TIMEOUT = 5000;
		String COOKIE_NAME = "Cookie";
		String SET_COOKIE = "Set-cookie";

	}

	interface Action {
		String RE_LOGIN = "RE_LOGIN";
	}
	
	interface Map {
		// 搜索请求返回成功状态码
		int CODE_SUCCESS = 1000;
		// 默认搜索半径，单位米
		int DEFAULT_RADIUS = 1000;
	}

	interface HttpStatusCode {

		/**
		 * 成功
		 */
		String HttpStatus_200 = "200";
		/**
		 * 参数错误
		 */
		String HttpStatus_400 = "400";
		/**
		 * 未通过身份认证
		 */
		String HttpStatus_401 = "401";
		/**
		 * 没有访问对应资源的权限
		 */
		String HttpStatus_403 = "403";
		/**
		 * 未找到资源
		 */
		String HttpStatus_404 = "404";
		/**
		 * 服务端错误
		 */
		String HttpStatus_500 = "500";
	}

	interface EventCode {
		int LOGIN_EXPIRED = -1001;
		int LOGIN_SUCCESS = 1;
		int LOG_OUT = 2;
		int COMMIT_SUCCESS = 3;
		int TODO_DONE = 4;
	}

	interface DateFormat {

		SimpleDateFormat WITH_HMS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		SimpleDateFormat WITHOUT_HMS = new SimpleDateFormat("yyyy-MM-dd");
		SimpleDateFormat WITHOUT_HMS_00 = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
		SimpleDateFormat HHMM = new SimpleDateFormat("HH:mm");
		SimpleDateFormat HMM = new SimpleDateFormat("H:mm");
		SimpleDateFormat MMDDHHmm = new SimpleDateFormat("MM-dd HH:mm");
		SimpleDateFormat CN_M_D = new SimpleDateFormat("M月d日");
		SimpleDateFormat CN_MM_DD = new SimpleDateFormat("MM月dd日");
		SimpleDateFormat CN_MD_H_m = new SimpleDateFormat("M月d日 H时m分");
		SimpleDateFormat CN_WITHOUT_HMS = new SimpleDateFormat("yyyy年MM月dd日");
	}

	interface HttpTime {
		 long CACHE_SIZE = 100 * 1024 * 1024;
		 long CONNECT_TIMEOUT = 60 * 1000 * 2;
		 long READ_TIMEOUT = 60 * 1000 * 2;
		 long WRITE_TIMEOUT = 60 * 1000 * 2;
	}

	interface Sp {
		String SP_USER_SETTINGS = "user_settings";
	}

	interface ParkingStatus {
		int RESERVE = 1;
		int PARK = 2;
		int EVAL = 3;
	}
}
